package com.cqjtu.graduation.entity;

/**
 * 记录所有菜品的列表表，对应数据库中foottype表
 * @author tianya
 */
public class FoodTypeDO extends BaseDO{
    private Integer foodtypeId;
    private String  foodtypeName;
    private String  foodtypeIntroduction;
    private String  foodtypeDetail;
    private Integer foodtypeIsrecommend; //菜品推荐
    private String  foodtypePicturePath;
    private Float foodtypePrice;//以分为单位，用整数存储，例如1099分=10.99元

    public void setFoodtypeId(Integer foodtypeId) {
        this.foodtypeId = foodtypeId;
    }

    public Integer getFoodtypeId() {
        return foodtypeId;
    }


    public String getFoodtypeName() {
        return foodtypeName;
    }

    public void setFoodtypeName(String foodtypeName) {
        this.foodtypeName = foodtypeName;
    }

    public String getFoodtypeIntroduction() {
        return foodtypeIntroduction;
    }

    public void setFoodtypeIntroduction(String foodtypeIntroduction) {
        this.foodtypeIntroduction = foodtypeIntroduction;
    }

    public String getFoodtypeDetail() {
        return foodtypeDetail;
    }

    public void setFoodtypeDetail(String foodtypeDetail) {
        this.foodtypeDetail = foodtypeDetail;
    }

    public Integer getFoodtypeIsrecommend() {
        return foodtypeIsrecommend;
    }

    public void setFoodtypeIsrecommend(Integer foodtypeIsrecommend) {
        this.foodtypeIsrecommend = foodtypeIsrecommend;
    }

    public String getFoodtypePicturePath() {
        return foodtypePicturePath;
    }

    public void setFoodtypePicturePath(String foodtypePicturePath) {
        this.foodtypePicturePath = foodtypePicturePath;
    }

    public Float getFoodtypePrice() {
        return foodtypePrice;
    }

    public void setFoodtypePrice(Float foodtypePrice) {
        this.foodtypePrice = foodtypePrice;
    }

    @Override
    public String toString() {
        return "FoodTypeDO{" +
                "foodtypeId=" + foodtypeId +
                ", foodtypeName='" + foodtypeName + '\'' +
                ", foodtypeIntroduction='" + foodtypeIntroduction + '\'' +
                ", foodtypeDetail='" + foodtypeDetail + '\'' +
                ", foodtypeIsrecommend=" + foodtypeIsrecommend +
                ", foodtypePicturePath='" + foodtypePicturePath + '\'' +
                ", foodtypePrice=" + foodtypePrice +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FoodTypeDO)) return false;

        FoodTypeDO that = (FoodTypeDO) o;

        if (getFoodtypeId() != null ? !getFoodtypeId().equals(that.getFoodtypeId()) : that.getFoodtypeId() != null)
            return false;
        if (getFoodtypeName() != null ? !getFoodtypeName().equals(that.getFoodtypeName()) : that.getFoodtypeName() != null)
            return false;
        if (getFoodtypeIntroduction() != null ? !getFoodtypeIntroduction().equals(that.getFoodtypeIntroduction()) : that.getFoodtypeIntroduction() != null)
            return false;
        if (getFoodtypeDetail() != null ? !getFoodtypeDetail().equals(that.getFoodtypeDetail()) : that.getFoodtypeDetail() != null)
            return false;
        if (getFoodtypeIsrecommend() != null ? !getFoodtypeIsrecommend().equals(that.getFoodtypeIsrecommend()) : that.getFoodtypeIsrecommend() != null)
            return false;
        if (getFoodtypePicturePath() != null ? !getFoodtypePicturePath().equals(that.getFoodtypePicturePath()) : that.getFoodtypePicturePath() != null)
            return false;
        return getFoodtypePrice() != null ? getFoodtypePrice().equals(that.getFoodtypePrice()) : that.getFoodtypePrice() == null;
    }

    @Override
    public int hashCode() {
        int result = getFoodtypeId() != null ? getFoodtypeId().hashCode() : 0;
        result = 31 * result + (getFoodtypeName() != null ? getFoodtypeName().hashCode() : 0);
        result = 31 * result + (getFoodtypeIntroduction() != null ? getFoodtypeIntroduction().hashCode() : 0);
        result = 31 * result + (getFoodtypeDetail() != null ? getFoodtypeDetail().hashCode() : 0);
        result = 31 * result + (getFoodtypeIsrecommend() != null ? getFoodtypeIsrecommend().hashCode() : 0);
        result = 31 * result + (getFoodtypePicturePath() != null ? getFoodtypePicturePath().hashCode() : 0);
        result = 31 * result + (getFoodtypePrice() != null ? getFoodtypePrice().hashCode() : 0);
        return result;
    }
}
